import { createRouter, createWebHistory } from 'vue-router';
import UserListView from '@/views/UserListView.vue';
import UserAddView from '@/views/UserAddView.vue';
import UserEditView from '@/views/UserEditView.vue';

const routes = [
  {
    path: '/',
    name: 'UserList',
    component: UserListView
  },
  {
    path: '/add',
    name: 'UserAdd',
    component: UserAddView
  },
  {
    path: '/edit/:id',
    name: 'UserEdit',
    component: UserEditView
  }
];

const router = createRouter({
  history: createWebHistory(),
  routes
});

export default router;
